<html>
 <head>
  <meta charset="UTF-8">
 </head>
 <body>
  <h1 data-lake-id="mLmOE" id="mLmOE"><span data-lake-id="ub845a6a5" id="ub845a6a5">典型回答</span></h1>
  <p data-lake-id="u05ab49b1" id="u05ab49b1"><br></p>
  <p data-lake-id="ue9fda915" id="ue9fda915"><span data-lake-id="u321c22ed" id="u321c22ed">RocketMQ主要由Producer、Broker和Consumer三部分组成，如下图所示：</span></p>
  <p data-lake-id="u6ef44ca1" id="u6ef44ca1"><br></p>
  <p data-lake-id="uc24a1c34" id="uc24a1c34"><img src="https://cdn.nlark.com/yuque/0/2023/png/5378072/1679211487811-e336d552-e96e-49f4-a1ce-121163febc86.png?x-oss-process=image%2Fwatermark%2Ctype_d3F5LW1pY3JvaGVp%2Csize_63%2Ctext_SmF2YSA4IEd1IFA%3D%2Ccolor_FFFFFF%2Cshadow_50%2Ct_80%2Cg_se%2Cx_10%2Cy_10"></p>
  <p data-lake-id="u3189ddf8" id="u3189ddf8"><span data-lake-id="uce54a28c" id="uce54a28c">​</span><br></p>
  <ol list="u5d346fb4">
   <li fid="u6466589d" data-lake-id="uf99dd50e" id="uf99dd50e"><span data-lake-id="u9822ab90" id="u9822ab90">Producer：消息生产者，负责将消息发送到Broker。</span></li>
   <li fid="u6466589d" data-lake-id="u5a449c9c" id="u5a449c9c"><span data-lake-id="u9602f03c" id="u9602f03c">Broker：消息中转服务器，负责存储和转发消息。RocketMQ支持多个Broker构成集群，每个Broker都拥有独立的存储空间和消息队列。</span></li>
   <li fid="u6466589d" data-lake-id="u5fb34e7a" id="u5fb34e7a"><span data-lake-id="u5c725417" id="u5c725417">Consumer：消息消费者，负责从Broker消费消息。</span></li>
   <li fid="u6466589d" data-lake-id="u229533ee" id="u229533ee"><span data-lake-id="u021aaaa9" id="u021aaaa9">NameServer：名称服务，负责维护Broker的元数据信息，包括Broker地址、Topic和Queue等信息。Producer和Consumer在启动时需要连接到NameServer获取Broker的地址信息。</span></li>
   <li fid="u6466589d" data-lake-id="ufa9e110d" id="ufa9e110d"><span data-lake-id="u616b40c9" id="u616b40c9">Topic：消息主题，是消息的逻辑分类单位。Producer将消息发送到特定的Topic中，Consumer从指定的Topic中消费消息。</span></li>
   <li fid="u6466589d" data-lake-id="u02ec24e7" id="u02ec24e7"><span data-lake-id="uec076d05" id="uec076d05">Message Queue：消息队列，是Topic的物理实现。一个Topic可以有多个Queue，每个Queue都是独立的存储单元。Producer发送的消息会被存储到对应的Queue中，Consumer从指定的Queue中消费消息。</span></li>
  </ol>
 </body>
</html>